/**
 * Copyright
 */
package org.sevaapp.configuration;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.MessageSource;
import org.springframework.stereotype.Component;

/**
 * @author Srini
 *
 */
@Component
public class ApplicationConfigurationHelper {
	
	@Autowired
    private MessageSource messageSource;
	
	public String getProperty(String propertyCode) {
		return this.getProperty(propertyCode, null);
	}

	public String getProperty(String propertyCode, Object[] propertyArgs) {
		String propertyValue = messageSource.getMessage(propertyCode, propertyArgs, "Required", null);
		return propertyValue;
	}
}

